﻿using SqlSugar;

namespace KdbndpTest.Models;


[SugarTable("Order", "订单表")]
public class Order
{
    [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
    public int Id { get; set; }

    [SugarColumn(ColumnDataType = "varchar(50)", ColumnDescription = "订单名称",ColumnName = "Name")]
    public string? Name { get; set; }

    [SugarColumn(ColumnDataType = "numeric(18,2)", ColumnDescription = "订单价格")]
    public decimal Price { get; set; }

    [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
    public DateTime CreateTime { get; set; }

    [SugarColumn(ColumnDataType = "int8", IsNullable = true)]
    public int CustomId { get; set; }

    [SugarColumn(IsIgnore = true)]
    public List<OrderItem>? Items { get; set; }
}
